]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
app-display: Escape categories in filter labels
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 25 Feb 2011 16:50:39 +0000 (17:50 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 25 Feb 2011 17:04:08 +0000 (18:04 +0100)
As gnome-shell now switched to use the menu file from gnome-menus,
we no longer have direct control over category names. If such a name
contains unescaped markup, the shell will crash when trying to create
the filter label, so make sure to escape markup in category names.

js/ui/appDisplay.js

index 91a39151fca604bfd7986ce78fc0a23548c67bdd..ebc19d156e2e348713c18e5cf9d3a8de0ac5d6d5 100644 (file)
@@ -1,6 +1,7 @@
 /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
 
 const Clutter = imports.gi.Clutter;
+const GLib = imports.gi.GLib;
 const Gtk = imports.gi.Gtk;
 const Shell = imports.gi.Shell;
 const Lang = imports.lang;
@@ -143,7 +144,7 @@ ViewByCategories.prototype = {
     },
 
     _addFilter: function(name, num) {
-        let button = new St.Button({ label: name,
+        let button = new St.Button({ label: GLib.markup_escape_text (name, -1),
                                      style_class: 'app-filter',
                                      x_align: St.Align.START });
         this._filters.add(button, { expand: true, x_fill: true, y_fill: false });